package com.gscitysfy.cus.drain.modules.command.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gscitysfy.cloudfrmwk.assistant.domain.Result;
import com.gscitysfy.cus.drain.annotations.DictTranslation;
import com.gscitysfy.cus.drain.annotations.FieldParam;
import com.gscitysfy.cus.drain.constants.DicConstant;
import com.gscitysfy.cus.drain.modules.command.dto.DangerSituationManageDto;
import com.gscitysfy.cus.drain.modules.command.dto.IPageDto;
import com.gscitysfy.cus.drain.modules.command.dto.ReservePlanManageDto;
import com.gscitysfy.cus.drain.modules.command.dto.SchemeManageDto;
import com.gscitysfy.cus.drain.modules.command.entity.DrainCommandDispatchSchemeCar;
import com.gscitysfy.cus.drain.modules.command.service.IDrainCommandDispatchSchemeCarService;
import com.gscitysfy.cus.drain.modules.command.vo.DangerSituationManageQuery;
import com.gscitysfy.cus.drain.modules.warning.entity.DrainSystemCommandLead;
import com.gscitysfy.cus.drain.modules.warning.service.IDrainSystemCommandLeadService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Administrator
 * @since 2022-11-16 14:37:14
 */
@RestController
@RequestMapping("/schemeCar")
public class DrainCommandDispatchSchemeCarController {

    @Autowired
    IDrainCommandDispatchSchemeCarService drainCommandDispatchSchemeCarService;
    /**
     * 获取预警机制详情
     * @return
     */
    @Operation(summary = "获取调度方案的车辆")
    @GetMapping("/listOrDetail")
    public Result<Object> listOrDetail(@Parameter(hidden = true) DrainCommandDispatchSchemeCar drainCommandDispatchSchemeCar){
        return drainCommandDispatchSchemeCarService.getListByQuery( drainCommandDispatchSchemeCar);
    }
    @Operation(summary = "调度方案删除车辆")
    @PostMapping(value = "/deleteSchemeCar")
    public Result<Boolean> deleteSchemeCar(@RequestBody DrainCommandDispatchSchemeCar dto) {
        return Result.content(drainCommandDispatchSchemeCarService.deleteSchemeCar(dto));
    }
}
